<template>
  <div class="subPage">
    <div>
      <div class="topic" >自助机扫描打印票据</div>
      <canvas canvas-id="qrcode" class="qrCode" ></canvas>
    </div>
  </div>
</template>
<script>
  import { mapState } from 'vuex'
  import wxbarcode from 'wxbarcode'
  import api from '@/api/api'
  let app = getApp()
  export default {
    data() {
      return {
      }
    },
    onShow() {
      let param = this.$route.query
      console.log(param)
      wxbarcode.qrcode('qrcode', param.code, 420, 420);
    },
    methods: {
    }
  }
</script>
<style scoped lang='less'>
.subPage {
  overflow: hidden;
}
.qrCode {
  height: 420rpx;
  width: 420rpx;
  margin: 150rpx auto;
  margin-top: -10rpx;
}
.topic {
  color: #000;
  margin-top: 150rpx;
  display: block;
  font-size: 36rpx;
  text-align: center;
  font-weight: 600;
  letter-spacing: 1rpx;
}
</style>
